﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataService.Office.Word
{
    public class XmlTextStyleDTO
    {
        /// <summary>字体类型 例：微软雅黑</summary>
        public FontFamilysEnum FontFamilysEnum { get; set; }
        /// <summary>
        ///word中的字体对应程序中的磅值,XML中的字体是磅值*2
        ///例word字体是五号,磅值是10.5，则XML中的值是10.5*2=21
        /// </summary>
        public FontSizeEnum FontSizeEnum { get; set; }
        /// <summary>
        /// 文字颜色,例如 Red
        /// </summary>
        public string ColorName { get; set; }
        /// <summary>
        /// 背景颜色 例如 Red
        /// </summary>
        public string BackColorName { get; set; }
        /// <summary>
        /// 16进制颜色
        /// </summary>
        public string Hx16Color { get; set; }
        public Algin Algin { get; set; }
        //缩进
        public IndentationEnum IndentationEnum { get; set; }
        /// <summary> 左缩进值(该值为word中字符值),（单位：字符） </summary>
        public int IndentationValue { get; set; }
        /// <summary> 右缩进值(该值为word中字符值),（单位：字符） </summary>
        public int RightIndentaionValue { get; set; }
        /// <summary> 首行缩进(该值为word中字符值),（单位：字符） </summary>
        public int FirstIndentaionValue { get; set; }
        /// <summary>
        /// 段前间距
        /// </summary>
        public SpacingBetweenLinesEnum BeforeBetweenLinesEnum { get; set; }
        /// <summary>段前 间距值 </summary>
        public int BeforeBetweenLinesValue { get; set; }

        /// <summary>
        /// 段后 间距
        /// </summary>
       public SpacingBetweenLinesEnum AfterBetweenLinesEnum { get; set; }
        /// <summary>段后 间距值 </summary>
        public int AfterBetweenLinesValue { get; set; }

        public LineHeightType LineHeightType { get; set; }
        /// <summary>
        /// 行距
        /// </summary>
        public decimal LineValue { get; set; }
        public string StyleId { get; set; }
        /// <summary>
        /// true:加粗  false:不加粗
        /// </summary>
        public bool FontBold { get; set; }
        /// <summary>
        /// true:加下划线  false:不加下划线
        /// </summary>
        public bool FontUnderline { get; set; }

        /// <summary>
        /// 前几行是表头，例如 3，则前三行是表头
        /// </summary>
        public int TableHeadRowNum { get; set; } = 1;
    }
    public enum Algin
    {
        /// <summary>
        /// 左对齐
        /// </summary>
        Left = 1,
        /// <summary>
        /// 右对齐
        /// </summary>
        Right = 2,
        /// <summary>
        /// 居中对齐
        /// </summary>
        Center = 3,
        /// <summary>
        /// 两端对齐
        /// </summary>
        Both = 4

    }
    public enum IndentationEnum
    {
        /// <summary>
        /// 首行缩进
        /// </summary>
        FirstLineIndentation = 1,
        /// <summary>
        /// 左缩进
        /// </summary>
        LeftIndentation = 2
    }
    public enum SpacingBetweenLinesEnum
    {
        /// <summary>
        /// 端前行间距
        /// </summary>
        BeforeLines = 1,
        /// <summary>
        /// 端后行间距
        /// </summary>
        AfterLines = 2,
        /// <summary>
        /// 文本中间行间距
        /// </summary>
        Line = 3,
    }
    public enum FontSizeEnum
    {
        八号,
        七号,
        小六,
        六号,
        小五,
        五号,
        小四,
        四号,
        小三,
        三号,
        小二,
        二号,
        小一,
        一号,
        小初,
        初号
    }
    /// <summary>
    /// 字体集
    /// </summary>
    public enum FontFamilysEnum
    {
        CUSTOM,
        Arial,
        Batang,
        BatangChe,
        Calibri,
        Cambria,
        Candara,
        Consolas,
        Ebrima,
        Footlight_MT_Light,
        Kalinga,
        Kokila,
        Mangal,
        Symbol,
        Times_New_Roman,
        Webdings,
        仿宋,
        华文中宋,
        华文仿宋,
        华文宋体,
        华文彩云,
        华文新魏,
        华文楷体,
        华文琥珀,
        华文细黑,
        华文行楷,
        华文隶书,
        宋体,
        幼圆,
        微软雅黑,
        新宋体,
        方正姚体,
        方正舒体,
        楷体,
        隶书,
        黑体
    }
    public enum LineHeightType
    {
        Single = 0,
        OneDotFive = 1,
        Double = 2,
        Exactly = 3
    }
}
